# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=e2fsimage
pkgver=0.2.3
pkgrel=3
pkgdesc="create and populate an ext2/3/4 filesystem image as non-root user"
url="https://github.com/Ledest/e2fsimage"
arch="all"
license="BSD-3-Clause"
makedepends="e2fsprogs-dev e2fsprogs-extra"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Ledest/e2fsimage/archive/$pkgver.tar.gz"

build() {
	prefix=/usr mandir=/usr/share/man ./configure
	make
}

check() {
	./src/e2fsimage -f test.img -d ./src
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="b6bf97ae35af7c48063f7a6dc19af80fec4bdfcd4d9b6064168b5e5a37ead57b3a01772f659f5004d6d5f1217cccba6a019e1974f87503fcaf526a15d6187ed7  e2fsimage-0.2.3.tar.gz"
